package cn.tedu.spring.iocxml.bean;

import cn.tedu.spring.iocxml.User;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestStudent {

    /** 接口有一个唯一的实现类时，能否根据接口class获取bean */
    @Test
    public void impTest(){
        ApplicationContext context = new ClassPathXmlApplicationContext("bean.xml");
        Student student = context.getBean(Student.class);
        student.run();
    }
}








